package com.weipai.springboot.module.dao;

import com.weipai.springboot.model.CustomerAddress;
import com.weipai.springboot.model.CustomerBank;
import com.weipai.springboot.model.CustomerInvoice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/08/23 14:10
 */
public interface CenterDao {

    //获取用户的收货地址
    List<CustomerAddress> getAddressByCustomerId(String id);

    //获取收货地址详细信息
    CustomerAddress getAddressInfoById(String id);

    //新增收货地址
    int saveAddress(CustomerAddress address);

    //删除收货地址
    int deleteAddressById(String id);

    //新增银行卡
    int saveBank(CustomerBank customerBank);

    //获取用户的银行卡
    List<CustomerBank> getBankByCustomerId(String id);

    //删除银行卡
    int deleteBankById(String id);

    //绑定支付宝账号
    int bindingAlipayAccount(String customerId, String alipayAccount, String realName);

    //修改收货地址
    int updateAddress(CustomerAddress address);

    //新增发票
    int saveInvoice(CustomerInvoice customerInvoice);

    //修改发票
    int updateInvoice(String invoiceId, String companyName, String taxNumber, Integer isDeFault);

    //获取用户的发票
    List<CustomerInvoice> invoiceList(String customerId);

    //删除发票信息
    int deleteInvoiceById(String id);

    //获取支付宝账号详细信息
    Map<String,Object> getAlipayAccountCustomerId(String customerId);

    CustomerInvoice getInvoiceById(String invoiceId);
}
